package cn.ylz.ylmall.order.pojo.request;

import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @author pc
 */
@Data
public class SingleOrderReq {
    /**
     * 收货人名字
     */
    @NotNull
    private String receiverName;

    /**
     * 收货人电话
     */
    @NotNull
    private String receiverMobile;

    /**
     * 收货人地址
     */
    @NotNull
    private String receiverAddress;

    /**
     * 商品id
     */
    private Integer productId;

    /**
     * 商品名称
     */
    private String productName;

    /**
     * 商品图片
     */
    private String productImg;

    /**
     * 单价（下单时的价格）
     */
    private BigDecimal unitPrice;

    /**
     * 商品数量
     */
    private Integer quantity;

    /**
     * 商品总价
     */
    private BigDecimal totalPrice;

    public SingleOrderReq(String receiverName, String receiverMobile, String receiverAddress, Integer productId, String productName, String productImg, BigDecimal unitPrice, Integer quantity, BigDecimal totalPrice) {
        this.receiverName = receiverName;
        this.receiverMobile = receiverMobile;
        this.receiverAddress = receiverAddress;
        this.productId = productId;
        this.productName = productName;
        this.productImg = productImg;
        this.unitPrice = unitPrice;
        this.quantity = quantity;
        this.totalPrice = totalPrice;
    }
}
